import {Module} from "@nestjs/common";
import {BreathServerController} from "./breath-server.controller";
import {BreathServerService} from "./breath-server.service";
import {SocketClientService} from "./services/socket-client/socket-client.service";
import {MockSocketServerService} from "./services/mock-socket-server/mock-socket-server.service";
import {WsGateway} from "./ws/ws.gateway";
import {CallFilterService} from "./services/call-filter/call-filter.service";
import {LoggerModule} from "nestjs-pino";
import {LogModule, LogService} from "@app/log";
import {APP_INTERCEPTOR} from "@nestjs/core";
import {MapResInterceptor} from "../../../libs/interceptor/map-res/map-res.interceptor";
import {TransportWithinServiceModule} from "./services/transport-within-service/transport-within-service.module";
import {EnumMicroService} from "../../../types/types";
import {MockGatewaySignalServerService} from './services/mock-gateway-signal-server/mock-gateway-signal-server.service';
import {EventEmitterModule} from '@nestjs/event-emitter';

@Module({
    imports: [
        LogModule.register(EnumMicroService.breath),
        LoggerModule.forRoot(),
        TransportWithinServiceModule,
        EventEmitterModule.forRoot(),
    ],
    controllers: [BreathServerController],
    providers: [
        BreathServerService,
        SocketClientService,
        SocketClientService,
        MockSocketServerService,
        WsGateway,
        CallFilterService,
        LogService,
        {
            provide: APP_INTERCEPTOR,
            useClass: MapResInterceptor,
        },
        MockGatewaySignalServerService,
    ],
})
export class BreathServerModule {
}
